#include<stdio.h>
#include<string.h>
int main()
{
	char temp;
	int n,lena=0,lenb=0,i,lack=0,a[123],b[123];
	
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	
	while( (temp=getchar())!='\n' )
	{
		a[temp]++;
		lena++;
	}
	
	while( (temp=getchar())!='\n' )
	{
		b[temp]++;
		lenb++;
	}
	
	for(i=47;i<=122;i++)
	{
		if(b[i]==0)
			continue;
		if(a[i]-b[i]>=0)
			continue;
		else
			lack+=b[i]-a[i];
	}

	if(lack==0)
		printf("Yes %d\n",lena-lenb);
	else
		printf("No %d\n",lack);
	
	return 0;
}
